<h1><%= @user.get_name %>: <%= t(:offs) %></h1>

<table>
  <tr>
    <th><%= t(:off_date) %></th>
    <th><%= t(:offed_hours) %></th>
    <th><%= t(:notes) %></th>
    <th><%= t(:actions) %></th>
  </tr>
  <% @offs.each do |o| %>
  <tr>
    <td><%= o.off_date %></td>
    <td><%= o.hours %></td>
    <td><%= o.notes %></td>
    <td>
      <ul class="off-actions">
        <li><%= link_to t(:edit), edit_admin_user_off_path(@user, o.id) %></li>
        <li><%= link_to t(:remove), admin_user_off_path(@user, o.id), :method => 'delete', :confirm => t(:confirmation_message) %></li>
      </ul>
    </td>
  </tr>
  <% end %>
</table>
<p class="off-hours"><%= t(:total_offs) %>: <%= @user.off_hours %></p>

<p id="new-off"><%= link_to t(:new_off), new_admin_user_off_path(@user) %></p>
<p class="back"><%= link_to t(:back), admin_users_path %></p>
